import {http} from '../../utils/request.js'



export function swipe() {
  return http('/api/goods/is_new/1','get')
}

export function NewShop() {
  return http('/api/goods/is_new/1','get')
}


export function HomeCommend() {
  return http('/api/goods/is_recommend/1','get')
}


export function Details(id) {
	// console.log(id,11156)
  return http(`/api/goods/detail/${id}`,'get')
}
// 获取购物车列表

export function GetCart(member_id) {
  return http(`/api/getCartList/?member_id=${member_id}`,'get')
}
//加入购物车 
export function AddCart(data) {
	   // console.log(data.goods_remark,456555)
	  
  return http(`/api/addcart/?member_id=${data.member_id}&goods_id=${data.goods_id}&goods_name=${data.goods_name}&price=${data.shop_price}&number=${data.store_count}&sku_id=1&sku_pname=2&sku_sname=1&goods_img=${data.original_img}&remark=${data.goods_remark} `, 'post')
 
}
// 删除购物车
export function DelCart(id) {
	// console.log(id,555)
  return http(`/api/deletecart/?id=${id}`,'get')
}
// 清空购物车
export function ClearAll(member_id) {
	// console.log(id,555)
  return http(`/api/clearcart/?member_id=${member_id}`,'get')
}
//搜索接口
export function Search(keywords) {
  return http(`/api/goods/search/200/${keywords}`,'get')
}
// 获取分类接口
export function NavFl(id) {
	// console.log(id,555)
  return http(`/api/goods/getMenuGoodsList/1/${id}`,'get')
}
// 获取分类接口
export function Login(phone) {
	// console.log(id,555)
  return http(`/api/login/?phone=${phone}`,'post')
}